import java.util.ArrayList;

public class task2 {
    public static void putData(int[] a) {
        for (int i = 0; i < a.length; i++) {
            a[i] = (int) (Math.random()*100);
        }
    }

    public static void copy(int[] a, int[] b) {
        for (int i = 0; i < a.length; i++) {
            b[i] = a[i];
        }
    }

    public static double benchmark(int i) {
        long j = (long) Math.pow(10,i);
        int[] a = new int[(int) j];
        int[] b = new int[(int) j];
        int[] c = new int[(int) j];
        int[] d = new int[(int) j];
        putData(c);
        putData(d);
        putData(a);
        putData(b);

        long time1 = System.nanoTime();
        System.arraycopy(a, 0, b, 0, b.length);
        System.arraycopy(a, 0, c, 0, c.length);
        System.arraycopy(a, 0, d, 0, d.length);
        time1 -= System.nanoTime();

        long time2 = System.nanoTime();
        copy(a, b);
        copy(a, c);
        copy(a, d);
        time2 -= System.nanoTime();

        return time2/(double)time1;
    }

    public static void main(String[] args) {
        for (int i = 3; i <= 7; i++) {
            System.out.println((long) Math.pow(10,i) + " " + benchmark(i));
        }
        for (int i = 3; i <= 7; i++) {
            System.out.println((long) Math.pow(10,i) + " " + benchmark(i));
        }
        for (int i = 3; i <= 7; i++) {
            System.out.println((long) Math.pow(10,i) + " " + benchmark(i));
        }
    }
}
